import random

import allure

from api.sms import SmsAPI


class TestSubmitMessage:

    # 前置处理
    def setup_method(self):
        self.sms_api = SmsAPI()

    @allure.title("发送短信验证码接口")
    def test01_success(self):
        # 调用聚合生产配置才能用 测试配置不行
        # verification_code = ''.join([str(random.randint(0, 9)) for _ in range(6)])
        # data = {
        #     "tel": "13835318823",
        #     "content": "验证码:" + verification_code + "，您正在进行用户登录，5分钟内有效，请勿提供给他人。",
        #     "serviceCode": "agent"
        # }
        # res = self.sms_api.submitMessage(data=data)
        # print(res.json())
        # assert 200 == res.status_code
        pass